package ServletController;


import java.io.IOException;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import classeMetier.Utilisateur;
import DAO.DAOFactory;
import DAO.UtilisateurDao;

public class ServletInscription extends HttpServlet {
    public static final String CONF_DAO_FACTORY = "daofactory";
    public static final String ATT_USER         = "utilisateur";
    public static final String ATT_FORM         = "form";
    public static final String VUE              = "/WEB-INF/inscription.jsp";

    private UtilisateurDao     utilisateurDao;

    public void init(ServletConfig config) throws ServletException {
        /* R??cup??ration d'une instance de notre DAO Utilisateur */
    	  System.out.println("*** initializing controller servlet.");
  	    super.init(config);
    }

    public void doGet( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {
        /* Affichage de la page d'inscription */
       // this.getServletContext().getRequestDispatcher( VUE ).forward( request, response );
    	
    	 doPost(request, response);
    }

    public void doPost( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {
        this.getServletContext().getRequestDispatcher( VUE ).forward( request, response );
    }
}